//浮雕效果
precision mediump float;
uniform sampler2D vTexture;
varying vec2 aCoord;

const vec2 texSize = vec2(1920,1080);

void main() {
    vec4 textureColor = texture2D(vTexture, aCoord);

    vec2 tex = aCoord;
    vec2 upLeftUV = vec2(tex.x - 1.0/texSize.x, tex.y - 1.0/texSize.y);
    vec4 upLeftColor = texture2D(vTexture,upLeftUV);
    vec4 delColor = textureColor - upLeftColor;
    float h = 0.3*delColor.x + 0.59*delColor.y + 0.11*delColor.z;
    vec4 bkColor = vec4(0.5, 0.5, 0.5, 1.0);
    gl_FragColor = vec4(h,h,h,0.0) + bkColor;
}

